Skip to content

Passing cross_attention_kwargs to StableDiffusionInstructPix2PixPipeline#7961

Merged
yiyixuxu merged 5 commits intohuggingface:mainfrom
AlexeyZhuravlev:patch-1
May 20, 2024
Merged

Passing cross_attention_kwargs to StableDiffusionInstructPix2PixPipeline#7961
yiyixuxu merged 5 commits intohuggingface:mainfrom
AlexeyZhuravlev:patch-1

Conversation

@AlexeyZhuravlev
Copy link
Copy Markdown
Contributor

@AlexeyZhuravlev AlexeyZhuravlev commented May 16, 2024

Add cross_attention_kwargs to __call__ method of StableDiffusionInstructPix2PixPipeline, which are passed to UNet.

What does this PR do?

Implements #7962

Adding ability to pass custom cross-attention arguments for UNet. This allows all the same functionality with cross-attention manipulations as inside StableDiffusionPipeline: LoRAs, custom adapters, etc.

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@sayakpaul @patil-suraj

Add `cross_attention_kwargs` to `__call__` method of `StableDiffusionInstructPix2PixPipeline`, which are passed to UNet.
Copy link
Copy Markdown
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sayakpaul sayakpaul requested a review from yiyixuxu May 17, 2024 03:23
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@yiyixuxu yiyixuxu merged commit a7bf77f into huggingface:main May 20, 2024
sayakpaul pushed a commit that referenced this pull request Dec 23, 2024
…peline` (#7961)

* Update pipeline_stable_diffusion_instruct_pix2pix.py

Add `cross_attention_kwargs` to `__call__` method of `StableDiffusionInstructPix2PixPipeline`, which are passed to UNet.

* Update documentation for pipeline_stable_diffusion_instruct_pix2pix.py

* Update docstring

* Update docstring

* Fix typing import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants